/**
 * Created by moc on 2016/3/30.
 */
var aes = require('./aes.js')


var checkLogin = function (req, res) {
    if (!req.cookies.user) {

        return null
    } else {
        if (req.cookies.user == "0")
            return null
        var user = aes.decode(req.cookies.user)
        return user
    }
}

exports.checkLogin = checkLogin